.class public Lcom/netease/newsreader/adapter/HeadlineAdapter;
.super Landroid/widget/BaseAdapter;
.source "HeadlineAdapter.java"


# instance fields
.field private mContext:Landroid/content/Context;

.field private mInflater:Landroid/view/LayoutInflater;

.field private mList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;>;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .locals 1
    .parameter "context"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;>;)V"
        }
    .end annotation

    .prologue
    .line 31
    .local p2, list:Ljava/util/List;,"Ljava/util/List<Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/Object;>;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 32
    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mInflater:Landroid/view/LayoutInflater;

    .line 33
    iput-object p1, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mContext:Landroid/content/Context;

    .line 34
    iput-object p2, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mList:Ljava/util/List;

    .line 35
    return-void
.end method

.method public static applyThemeForWeatherImage(Landroid/content/Context;Landroid/widget/ImageView;)V
    .locals 1
    .parameter "context"
    .parameter "imageView"

    .prologue
    .line 280
    invoke-static {p0}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->getThemeSettingsHelper(Landroid/content/Context;)Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v0

    invoke-virtual {v0}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->isDefaultTheme()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 281
    const/16 v0, 0xff

    invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setAlpha(I)V

    .line 285
    :goto_0
    return-void

    .line 283
    :cond_0
    const/16 v0, 0x7d

    invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setAlpha(I)V

    goto :goto_0
.end method

.method private bindSubitem(Landroid/view/View;I)V
    .locals 6
    .parameter "view"
    .parameter "position"

    .prologue
    const/16 v5, 0x8

    const/4 v4, 0x0

    .line 141
    add-int/lit8 v3, p2, -0x1

    mul-int/lit8 v3, v3, 0x3

    add-int/lit8 v0, v3, 0x1

    .line 142
    .local v0, listPosition:I
    const v3, 0x7f0c017e

    invoke-virtual {p1, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    .line 143
    .local v2, subItem:Landroid/view/View;
    iget-object v3, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mList:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v3

    if-ge v0, v3, :cond_0

    .line 146
    invoke-virtual {v2, v4}, Landroid/view/View;->setVisibility(I)V

    .line 147
    iget-object v3, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mList:Ljava/util/List;

    invoke-interface {v3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/Map;

    .line 148
    .local v1, map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    invoke-direct {p0, v2, v1, v5}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->bindViewItem(Landroid/view/View;Ljava/util/Map;I)V

    .line 151
    .end local v1           #map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :cond_0
    add-int/lit8 v0, v0, 0x1

    .line 152
    const v3, 0x7f0c017f

    invoke-virtual {p1, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    .line 153
    iget-object v3, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mList:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v3

    if-ge v0, v3, :cond_1

    .line 156
    invoke-virtual {v2, v4}, Landroid/view/View;->setVisibility(I)V

    .line 157
    iget-object v3, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mList:Ljava/util/List;

    invoke-interface {v3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/Map;

    .line 158
    .restart local v1       #map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    invoke-direct {p0, v2, v1, v5}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->bindViewItem(Landroid/view/View;Ljava/util/Map;I)V

    .line 161
    .end local v1           #map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :cond_1
    add-int/lit8 v0, v0, 0x1

    .line 162
    const v3, 0x7f0c0180

    invoke-virtual {p1, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    .line 163
    iget-object v3, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mList:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v3

    if-ge v0, v3, :cond_2

    .line 166
    invoke-virtual {v2, v4}, Landroid/view/View;->setVisibility(I)V

    .line 167
    iget-object v3, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mList:Ljava/util/List;

    invoke-interface {v3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/Map;

    .line 168
    .restart local v1       #map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    invoke-direct {p0, v2, v1, v5}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->bindViewItem(Landroid/view/View;Ljava/util/Map;I)V

    .line 171
    .end local v1           #map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :cond_2
    return-void
.end method

.method private bindView(Landroid/view/View;I)V
    .locals 3
    .parameter "view"
    .parameter "position"

    .prologue
    .line 132
    if-nez p2, :cond_0

    .line 133
    iget-object v1, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mList:Ljava/util/List;

    const/4 v2, 0x0

    invoke-interface {v1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/Map;

    .line 134
    .local v0, map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    new-instance v1, Ljava/util/Date;

    invoke-direct {v1}, Ljava/util/Date;-><init>()V

    invoke-virtual {v1}, Ljava/util/Date;->getHours()I

    move-result v1

    invoke-direct {p0, p1, v0, v1}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->bindViewItem(Landroid/view/View;Ljava/util/Map;I)V

    .line 138
    .end local v0           #map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :goto_0
    return-void

    .line 136
    :cond_0
    invoke-direct {p0, p1, p2}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->bindSubitem(Landroid/view/View;I)V

    goto :goto_0
.end method

.method private bindViewItem(Landroid/view/View;Ljava/util/Map;I)V
    .locals 11
    .parameter "view"
    .parameter
    .parameter "hours"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/view/View;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;I)V"
        }
    .end annotation

    .prologue
    .line 174
    .local p2, map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const v10, 0x7f0c0182

    invoke-virtual {p1, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v8

    check-cast v8, Landroid/widget/TextView;

    .line 175
    .local v8, week:Landroid/widget/TextView;
    if-eqz v8, :cond_0

    .line 176
    const-string v10, "week"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-virtual {v8, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 179
    :cond_0
    const v10, 0x7f0c0183

    invoke-virtual {p1, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    .line 180
    .local v1, date:Landroid/widget/TextView;
    if-eqz v1, :cond_1

    .line 181
    const-string v10, "date"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-virtual {v1, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 184
    :cond_1
    const v10, 0x7f0c0184

    invoke-virtual {p1, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    .line 185
    .local v3, nongli:Landroid/widget/TextView;
    if-eqz v3, :cond_2

    .line 186
    const-string v10, "nongli"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-virtual {v3, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 189
    :cond_2
    const v10, 0x7f0c0187

    invoke-virtual {p1, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    .line 190
    .local v0, climate:Landroid/widget/TextView;
    if-eqz v0, :cond_4

    .line 191
    const-string v10, "climate"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;

    .line 192
    .local v4, str:Ljava/lang/String;
    const/4 v10, 0x6

    if-ge p3, v10, :cond_c

    .line 195
    const-string v10, "lastDayWeather"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/Map;

    .line 196
    .local v2, lastMap:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    if-nez v2, :cond_3

    .line 197
    move-object v2, p2

    .line 199
    :cond_3
    const-string v10, "climate"

    invoke-interface {v2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-static {v10}, Lcom/netease/newsreader/model/Weather;->getNightStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v0, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 209
    .end local v2           #lastMap:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    .end local v4           #str:Ljava/lang/String;
    :cond_4
    :goto_0
    const v10, 0x7f0c00d7

    invoke-virtual {p1, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/TextView;

    .line 210
    .local v5, temperature:Landroid/widget/TextView;
    if-eqz v5, :cond_6

    .line 211
    const/4 v10, 0x6

    if-ge p3, v10, :cond_e

    .line 214
    const-string v10, "lastDayWeather"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/Map;

    .line 215
    .restart local v2       #lastMap:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    if-nez v2, :cond_5

    .line 216
    move-object v2, p2

    .line 221
    :cond_5
    const-string v10, "temperature"

    invoke-interface {v2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    .line 220
    invoke-virtual {v5, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 231
    .end local v2           #lastMap:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :cond_6
    :goto_1
    const v10, 0x7f0c0188

    invoke-virtual {p1, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v9

    check-cast v9, Landroid/widget/TextView;

    .line 232
    .local v9, wind:Landroid/widget/TextView;
    if-eqz v9, :cond_8

    .line 233
    const/4 v10, 0x6

    if-ge p3, v10, :cond_10

    .line 236
    const-string v10, "lastDayWeather"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/Map;

    .line 237
    .restart local v2       #lastMap:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    if-nez v2, :cond_7

    .line 238
    move-object v2, p2

    .line 240
    :cond_7
    const-string v10, "wind"

    invoke-interface {v2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-static {v10}, Lcom/netease/newsreader/model/Weather;->getNightStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 250
    .end local v2           #lastMap:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :cond_8
    :goto_2
    const v10, 0x7f0c0189

    invoke-virtual {p1, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/TextView;

    .line 251
    .local v6, updateTime:Landroid/widget/TextView;
    if-eqz v6, :cond_9

    .line 252
    const-string v10, "updateTime"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-virtual {v6, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 255
    :cond_9
    const v10, 0x7f0c00d9

    invoke-virtual {p1, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/ImageView;

    .line 256
    .local v7, weather:Landroid/widget/ImageView;
    if-eqz v7, :cond_b

    .line 257
    iget-object v10, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mContext:Landroid/content/Context;

    invoke-static {v10, v7}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->applyThemeForWeatherImage(Landroid/content/Context;Landroid/widget/ImageView;)V

    .line 259
    const/4 v4, 0x0

    .line 260
    .restart local v4       #str:Ljava/lang/String;
    const/4 v10, 0x6

    if-ge p3, v10, :cond_12

    .line 263
    const-string v10, "lastDayWeather"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/Map;

    .line 264
    .restart local v2       #lastMap:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    if-nez v2, :cond_a

    .line 265
    move-object v2, p2

    .line 267
    :cond_a
    const-string v10, "climate"

    invoke-interface {v2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-static {v10}, Lcom/netease/newsreader/model/Weather;->getNightStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    .line 275
    .end local v2           #lastMap:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :goto_3
    iget-object v10, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mContext:Landroid/content/Context;

    invoke-static {v4, v7, v10}, Lcom/netease/newsreader/model/Weather;->setWeatherBitmap(Ljava/lang/String;Landroid/widget/ImageView;Landroid/content/Context;)V

    .line 277
    .end local v4           #str:Ljava/lang/String;
    :cond_b
    return-void

    .line 200
    .end local v5           #temperature:Landroid/widget/TextView;
    .end local v6           #updateTime:Landroid/widget/TextView;
    .end local v7           #weather:Landroid/widget/ImageView;
    .end local v9           #wind:Landroid/widget/TextView;
    .restart local v4       #str:Ljava/lang/String;
    :cond_c
    const/16 v10, 0x12

    if-lt p3, v10, :cond_d

    .line 202
    const-string v10, "climate"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-static {v10}, Lcom/netease/newsreader/model/Weather;->getNightStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v0, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_0

    .line 205
    :cond_d
    const-string v10, "climate"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-virtual {v0, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_0

    .line 222
    .end local v4           #str:Ljava/lang/String;
    .restart local v5       #temperature:Landroid/widget/TextView;
    :cond_e
    const/16 v10, 0x12

    if-lt p3, v10, :cond_f

    .line 224
    const-string v10, "temperature"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-virtual {v5, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_1

    .line 227
    :cond_f
    const-string v10, "temperature"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-virtual {v5, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_1

    .line 241
    .restart local v9       #wind:Landroid/widget/TextView;
    :cond_10
    const/16 v10, 0x12

    if-lt p3, v10, :cond_11

    .line 243
    const-string v10, "wind"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-static {v10}, Lcom/netease/newsreader/model/Weather;->getNightStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_2

    .line 246
    :cond_11
    const-string v10, "wind"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-virtual {v9, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_2

    .line 268
    .restart local v4       #str:Ljava/lang/String;
    .restart local v6       #updateTime:Landroid/widget/TextView;
    .restart local v7       #weather:Landroid/widget/ImageView;
    :cond_12
    const/16 v10, 0x12

    if-lt p3, v10, :cond_13

    .line 270
    const-string v10, "climate"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-static {v10}, Lcom/netease/newsreader/model/Weather;->getNightStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    goto :goto_3

    .line 273
    :cond_13
    const-string v10, "climate"

    invoke-interface {p2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Ljava/lang/String;

    invoke-static {v10}, Lcom/netease/newsreader/model/Weather;->getDayStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    goto/16 :goto_3
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 89
    invoke-virtual {p0}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getRealCount()I

    move-result v0

    return v0
.end method

.method public getInitPosition(I)I
    .locals 4
    .parameter "position"

    .prologue
    .line 44
    if-gez p1, :cond_0

    move v2, p1

    .line 57
    :goto_0
    return v2

    .line 48
    :cond_0
    invoke-virtual {p0}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getRealCount()I

    move-result v1

    .line 49
    .local v1, realCount:I
    if-gtz v1, :cond_1

    move v2, p1

    .line 50
    goto :goto_0

    .line 53
    :cond_1
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getRealPosition(I)I

    move-result p1

    .line 55
    invoke-virtual {p0}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getCount()I

    move-result v0

    .line 57
    .local v0, count:I
    div-int/lit8 v2, v0, 0x2

    div-int/lit8 v3, v0, 0x2

    rem-int/2addr v3, v1

    sub-int/2addr v2, v3

    add-int/2addr v2, p1

    goto :goto_0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 2
    .parameter "position"

    .prologue
    .line 94
    iget-object v0, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mList:Ljava/util/List;

    invoke-virtual {p0, p1}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getRealPosition(I)I

    move-result v1

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 99
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getRealPosition(I)I

    move-result v0

    int-to-long v0, v0

    return-wide v0
.end method

.method public getItemViewType(I)I
    .locals 1
    .parameter "position"

    .prologue
    const/4 v0, 0x2

    .line 109
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getRealPosition(I)I

    move-result p1

    .line 110
    if-le p1, v0, :cond_0

    move p1, v0

    .end local p1
    :cond_0
    return p1
.end method

.method public getRealCount()I
    .locals 1

    .prologue
    .line 84
    iget-object v0, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x3

    goto :goto_0
.end method

.method public getRealPosition(I)I
    .locals 1
    .parameter "position"

    .prologue
    .line 67
    if-gez p1, :cond_1

    .line 74
    .end local p1
    :cond_0
    :goto_0
    return p1

    .line 70
    .restart local p1
    :cond_1
    invoke-virtual {p0}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getRealCount()I

    move-result v0

    .line 71
    .local v0, realCount:I
    if-lez v0, :cond_0

    .line 74
    rem-int/2addr p1, v0

    goto :goto_0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 3
    .parameter "position"
    .parameter "convertView"
    .parameter "viewparent"

    .prologue
    const/4 v1, 0x0

    .line 115
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getRealPosition(I)I

    move-result p1

    .line 116
    invoke-virtual {p0}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getRealCount()I

    move-result v0

    if-nez v0, :cond_0

    move-object v0, v1

    .line 128
    :goto_0
    return-object v0

    .line 120
    :cond_0
    if-nez p2, :cond_1

    .line 121
    iget-object v2, p0, Lcom/netease/newsreader/adapter/HeadlineAdapter;->mInflater:Landroid/view/LayoutInflater;

    if-nez p1, :cond_2

    const v0, 0x7f03007c

    :goto_1
    invoke-virtual {v2, v0, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 123
    new-instance v0, Landroid/widget/Gallery$LayoutParams;

    const/4 v1, -0x1

    .line 124
    const/4 v2, -0x2

    invoke-direct {v0, v1, v2}, Landroid/widget/Gallery$LayoutParams;-><init>(II)V

    .line 123
    invoke-virtual {p2, v0}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 125
    invoke-direct {p0, p2, p1}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->bindView(Landroid/view/View;I)V

    :cond_1
    move-object v0, p2

    .line 128
    goto :goto_0

    .line 122
    :cond_2
    const v0, 0x7f03007b

    goto :goto_1
.end method

.method public getViewTypeCount()I
    .locals 2

    .prologue
    const/4 v0, 0x3

    .line 104
    invoke-virtual {p0}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getRealCount()I

    move-result v1

    if-le v1, v0, :cond_0

    :goto_0
    return v0

    :cond_0
    invoke-virtual {p0}, Lcom/netease/newsreader/adapter/HeadlineAdapter;->getRealCount()I

    move-result v0

    goto :goto_0
.end method
